import request from '@/utils/request';

export async function getDictionaryByPage(params: any) {
  return request('/api/system/getDictionaryByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addDictionary(params: any) {
  return request('/api/system/addDictionary', {
    method: 'POST',
    data: params,
  });
}

export async function updateDictionary(params: any) {
  return request('/api/system/updateDictionary', {
    method: 'POST',
    data: params,
  });
}

export async function delDictionary(params: any) {
  return request('/api/system/delDictionary', {
    method: 'POST',
    data: params,
  });
}

export async function exportDictionary(params: any) {
  return request('/api/system/exportDictionary', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export default {
  getDictionaryByPage,
  addDictionary,
  updateDictionary,
  delDictionary,
  exportDictionary,
};
